<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="/assets/lib/layui/css/layui.css">
  <link rel="stylesheet" href="/assets/css/article/list.css">
</head>
<body>
    <div class="layui-card">
    <div class="layui-card-header">文章列表</div>
    
    <div class="layui-card-body">
        <form action="" class="layui-form search">
            <div class="layui-form-item">

                <div class="layui-inline">
                    <div class="layui-input-inline" style="width: 200px;">
                        <select name="category" lay-verify="" class="cos">
                    
                        </select>
                    </div>

                    <div class="layui-input-inline" style="width: 200px;">
                        <select name="state" lay-verify="">
                            <option value="">所有状态</option>
                            <option value="已发布">已发布</option>
                            <option value="草稿">草稿</option>
                        </select>
                    </div>
                </div>

                <div class="layui-inline">
                    <div class="layui-input-inline" style="width: 100px;">
                        <button class="layui-btn" lay-submit lay-filter="formDemo">筛选</button>
                    </div>
                </div>

            </div>
        </form>
      <table class="layui-table">
        <colgroup>
          <col width="40%">
          <col width="20%">
          <col width="18%">
          <col width="15%">
          <col>
        </colgroup>
        <thead>
          <tr>
            <th>文章标题</th>
            <th>分类</th>
            <th>发表时间</th>
            <th>状态</th>
            <th>操作</th>
          </tr> 
        </thead>
        <tbody>
            	<!-- 页面渲染模板 -->
        </tbody>
      </table>
     <div id="test1"></div>
      
    </div>
  </div>
</body>
</html>
    <!-- 页面渲染模板 -->
    <script type="text/html" id="list-show">
        {{each data item}}
        <tr>
            <td>{{item.title}}</td>
            <td>{{item.cate_name}}</td>
            <td>{{item.pub_date|dateFormat}}</td>
            <td>{{item.state}}</td>
            <td>
        <a href="/article/editor.html?id={{item.Id}}" class="layui-btn layui-btn-xs" target="shou">编辑</a>
        <button type="button" class="layui-btn layui-btn-xs  layui-btn-danger" data-id="{{item.Id}}">删除</button>
            </td>
        </tr>
        {{/each}}
    </script>
    
    <!-- 筛选 -->
    <script type="text/html" id="choose">
      <option value="">所有分类</option>
      {{each data val}}
      <option value="{{val.Id}}">{{val.name}}</option>
      {{/each}}
    </script>
<script src="/assets/lib/jquery.js"></script>
<script src="/assets/lib/echarts.min.js"></script>
<script src="/assets/lib/template-web.js"></script>
<script src="/assets/lib/layui/layui.all.js"></script>
<script src="/assets/js/unifty.js"></script>
<script src="/assets/js/article/list.js"></script>